

<div class="clearfix conversation">
    <div class="panel panel-default" style="margin-bottom: 0px;">
        <div class="panel-heading clearfix">
            <span class="panel-title col-md-8 title">
                   	{{title}}
            </span>
        </div>


        <div class="panel-body">
            <div class="col-lg-6">
<!--                 <div class="input-group"> -->
                    <input class="form-control  searchInput" data-ng-keydown="enterSearch($event)" data-ng-change="search()" data-ng-model="searchObj.searchKey" placeholder="{{type.searchTip}}">
<!--                     <div class="input-group-addon btn btn-default" data-ng-click="search()">搜索</div> -->
<!--                     <div class="col-lg-12"> -->
<!--                          <div class="btn btn-default" data-ng-if="searchObj.searchState" data-ng-click="toInit()">返回</div> -->
<!--                     </div> -->
<!--                 </div> -->


                <div class="col-lg-12 orgUserPicker-pickArea fancy-scrollbar" style="margin-top: 8px;background-color: #f9f2f1;height: 376px;" >
                    
                    <div ng-if="searchResultUsers.length>0" data-ng-hide="noneResult" style="position: relative;margin-top: 5px;margin-bottom: 0px;">
                    	<input ng-if="searchResultUsers.length>0" data-ng-checked="isSelectAll" type="checkbox" data-ng-click="checkAll(searchResultUsers)" class="orgUserPicker-user-input hand">
                    	<label ng-if="searchResultUsers.length>0" style="color: #428bca">全选</label>
                    </div>
                    <div class="org-sel-users" data-ng-hide="noneResult">
                    	<ul  class="nav nav-pills nav-stacked" style="padding:5px 0;">
                        <!-- <ul  class="nav nav-pills nav-stacked" style="padding:10px 0;"> -->
                            <li data-ng-repeat="org in orgs | filter:query track by org.orgId "
                                data-ng-include="'treeitem_orgUserPicker.html'"
                                    data-ng-if="!searchObj.searchState"></li>

                            <!--搜索出来的组织结果-->
                            <li data-ng-repeat="org in searchResultOrgs" data-ng-include="'treeitem_orgUserPicker.html'"></li>

                            <!--搜索出来的人员结果-->
                            <li data-ng-repeat="user in searchResultUsers">
                                <input type="checkbox" data-ng-click="toggleNode(user)" data-ng-checked="selectedNodes[user.userId]" class="orgUserPicker-user-input hand">
                                <span data-href style="color:#428bca;" data-tooltip="{{user.userOrgInfo}}"  data-tooltip-placement="right"
                                      class="orgUserPicker-tree-item" data-ng-bind-html="highlight(user,'user')"></span>
                            </li>
                            
                            <!-- 搜索出来的职位人员 -->
                            <li data-ng-if="searchPostResultUsers.length > 0">
	                            <table>
		                            <tr>
			                             <td class="orgUserPicker-tree-item-td" style="vertical-align: top;">
			                                 <span class="hand" style="width: 9px;height: 10px" data-ng-class="{'caret':showPostFlag,'caretRight':!showPostFlag}" data-ng-click="openPostTree()"></span>
			                             </td>
			                             <td style="vertical-align: top;" class="orgUserPicker-tree-item-td">  <input type="checkbox" data-ng-click="selectedAllPostNodes()" class="hand"></td>
			                             <td style="vertical-align: top;" class="orgUserPicker-tree-item-td">   <span data-ng-click="openPostTree()">{{searchObj.searchKey}}</span></td>
		                             </tr>
	                            </table>                          
                            </li>
                            <li data-ng-repeat="user in searchPostResultUsers" data-ng-hide="!showPostFlag">
                              <input type="checkbox" data-ng-click="toggleNode(user)" data-ng-checked="selectedNodes[user.userId]" class="orgUserPicker-user-input hand" style="margin-left: 0px;">
                                <span data-href style="color:#428bca;" data-tooltip="{{user.userOrgInfo}}"  data-tooltip-placement="right" 
                                class="orgUserPicker-tree-item" data-ng-bind-html="highlight(user,'user')"></span>
                            </li>
                        </ul>
                    </div>
                    <div data-ng-show="noneResult" style="text-align: center;margin-top: 100px;font-size: 15px;font-weight: bold;">
                        	无搜索结果
                    </div>
                </div>
                
                <div style="position: relative;top: 10px;float: left;">
        			注：<img alt="" src="images/local_level_select.png"> 表示选择仅本层级
        		</div>
        		<!-- 虚线 -->
        		<div style="position: relative;top: 15px;left:10;width: 550px;float: left;">
        			<hr style="height:1px;border:none;border-top:1px solid #e9e9e9;margin-top: 1px;margin-bottom:0px"/>
        		</div>
        		
        		<div style="float: left;">
        			<div style="position: relative;top: 20px;float: left;cursor: pointer;"  ng-click="changeImage(1)">
        				<img alt=""  src="images/department1.png" id="department1" >
        			</div>
        			
        			<div style="position: relative;top: 20px;left:35px;float: left;cursor: pointer;" ng-click="changeImage(2)">
        				<img alt="" src="images/company1.png" id="company1" >
        			</div>
        			
        			<div style="position: relative;top: 20px;left:70px;float: left;cursor: pointer;"  ng-click="changeImage(3)">
        				<img alt="" src="images/company_local1.png" id="company_local1">
        			</div>
        		</div>
        		
        		<div style="float: left;">
        			<div style="position: relative;top: 20px;float: left;left: 5px">
        				本部门
        			</div>
        			
        			<div style="position: relative;top: 20px;left:40px;float: left;">
        				企业通讯录
        			</div>
        			
        			<div style="position: relative;top: 20px;left:50px;float: left;">
        				本地+企业通讯录
        			</div>
        		</div>
        		
        		<div style="position: relative;top: 30px;left:10;width: 550px;float: left;">
        			<hr style="height:1px;border:none;border-top:1px solid #e9e9e9;margin-top: 1px;margin-bottom:0px"/>
        		</div>
        		
        		<!-- 时间 -->
        		<div style="float: left;">
        			<div style="position: relative;top: 45px;float: left;cursor: pointer;" ng-click="chooseTime(1)">
        				<img alt=""  src="images/time1.png" id="fifty" >
        				<div style="text-align: center; position: relative;bottom: 32px;font-size: 15px;color: #ffffff">
        					50
        				</div>
        			</div>
        			
        			<div style="position: relative;top: 45px;left:35px;float: left;cursor: pointer;" ng-click="chooseTime(2)">
        				<img alt="" src="images/time1.png" id="onehundred" >
        				<div style="text-align: center; position: relative;bottom: 32px;font-size: 15px;color: #ffffff">
        					100
        				</div>
        			</div>
        			
        			<div style="position: relative;top: 45px;left:70px;float: left;cursor: pointer;" ng-click="chooseTime(3)">
        				<img alt="" src="images/time1.png" id="onehundredandfifty">
        				<div style="text-align: center; position: relative;bottom: 32px;font-size: 15px;color: #ffffff">
        					150
        				</div>
        			</div>
        			
        			<div style="position: relative;top: 82px;left:150px;float: left;cursor: pointer;">
        				<div style="text-align: center; position: relative;bottom: 32px;font-size: 15px;color: #000000">
        					<input type="text" ng-model="timeChoose1" style="width: 80px;height:35px;border-radius:10px;border: 1px solid #d8d8d8;"> 分钟
        					<input type="hidden" ng-model="timeChoose"> 
        				</div>
        			</div>
        		</div>
            </div>
            <div class="col-lg-6">
                <div style="padding-top: 15px;">已选{{type.chiName}}&nbsp;:&nbsp;{{nodeCount}}</div>
                <div class="col-lg-12 orgUserPicker-pickArea fancy-scrollbar" style="margin-top: 8px;padding: 0 0;background-color: #f9f2f1;height: 376px;">
                    <ul style="padding: 8px 0;">
                       <li data-ng-repeat="i in selectedNodes" style="list-style: none;" class="orgUserPicker-selecte-li">
                           <div style="padding: 5px 0;">{{i[type.nameField]}}
                               <img data-ng-src="images/delete.png" class="orgUserPicker-selecte-li-deleteImg hand" data-ng-click="deleteNode(i[type.keyField])">
                           </div>
                       </li>
                    </ul>
                </div>
            </div>
        </div>
        
        <script type="text/ng-template" id="treeitem_orgUserPicker.html">
            <table width="100%">
                <tr>
                    <td class="orgUserPicker-tree-item-td" style="vertical-align: top;width:6px;" ng-click="toggleOpenTree(org)">
                        <span ng-if="!org.noneSubs" >
                            <span class="hand" style="width: 9px;height: 10px" data-ng-class="{'caret':org.isSubsShow,'caretRight':!org.isSubsShow}"></span>
                        </span>
                    </td>
                    <td style="vertical-align: top; width: 9px;" class="orgUserPicker-tree-item-td" data-ng-hide="singleUser">
                        <!--组织前面的复选框分两种情况：如果是新增组织，则代表当前组织是否选中，如果是新增成员，复选框相对于全选框，用于选择当前组织下的成员-->
                        <input id="{{org.orgId}}"data-ng-class="{'marginLeft11':(org.subs.length==0) && (!org.users || org.users.length==0)}"
                               data-ng-hide="type.name == 'user' && singleUser" data-ng-model="checkboxes.items[org.orgId]"
                               type="checkbox" data-ng-click="toggleOrgSelect(org)" /** data-ng-checked="isOrgSelect(org)" **/ class="hand" >
                    </td>
                    <td class="orgUserPicker-tree-item-td" style="vertical-align: top;">
                        <span href ng-click="toggleOpenTree(org)" data-ng-bind-html="highlight(org,'org')"
                              data-tooltip="{{org.tooltipShow?org.parentOrgs:''}}" data-tooltip-placement="right" class="orgUserPicker-tree-item hand"></span>
                    </td>
					<td class="orgUserPicker-tree-item-td pull-right" style="vertical-align: top;">
						<span data-ng-click="selfOrg(org)" title="本层级"><img class="selfOrg" data-ng-src=" {{ isSelfOrg(org) }}"></span>
					</td>
                </tr>
            </table>
            <ul style="list-style: none;padding-left: 15px;" ng-if="org.isSubsShow">
                <li data-ng-repeat="user in org.users" ng-show="type.name == 'user'">
                    <input type="checkbox" data-ng-click="toggleNode(user)" ng-checked="selectedNodes[user.userId]" class="orgUserPicker-user-input hand">
                    <span href data-ng-bind-html="highlight(user,'user')" style="color:#428bca;" class="orgUserPicker-tree-item"></span>
                </li>
                <li data-ng-repeat="org in org.subs" data-ng-include="'treeitem_orgUserPicker.html'"> </li>
            </ul>
        </script>
        <!--确定取消按钮-->
        <div class="panel-footer" style="height: 55px;position: relative;margin-top: 20px;position: relative;">
            <div class="pull-right">
                <!-- <button data-ng-click="selectOk()" class="btn btn-primary">选择完成 </button>
                <button data-ng-click="close()" class="btn btn-default">取消 </button> -->
                
                <div class="confirm_btn_user" data-ng-click="close()">
					<div style="font-size: 12px; color: #00000; text-align: center; position: relative; left: 3px; top: 25%;cursor: pointer;">取消</div>
				</div>
				
				<div class="confirm_btn1_user" data-ng-click="selectOk()">
					<div style="font-size: 12px; color: #00000; text-align: center; position: relative; left: 2px; top: 25%;cursor: pointer;">确定</div>
				</div>
				
            </div>
        </div>
    </div>

    <!--关闭-->
    <div data-ng-if="!showUserPanel" data-ng-click="close()" class="close-btn1" style="cursor: pointer;">
        <img src="images/delete1.png" id="changeDeleteImage"
					data-ng-mouseover="changeDeleteImage(true)"
					data-ng-mouseout="changeDeleteImage(false)" />
    </div>

</div>
